-- card: 33872 from stack: in -- bmap block id: 0 -- flags: 0000 -- background id: 4755 -- name: -- part contents for background part 4 ----- text ----- Functions may call themselves in a RECURSIVE fashion. For example, a function to raise a floating-point number to an integral power may be written: float expon(float x, int y) { if (y>0) return x * expon(x,y-1); else return 1.; } The scope of the formal parameters (and local variables, if any) of a function is the body of the function, and separate values for these variables are maintained for each invocation of the function. Thus there is no conflict when passing the value y-1 as an argument to the expon() function, even though the identifier y is itself used as a parameter of the called function. -- part contents for background part 7 ----- text ----- 97 -- part contents for background part 6 ----- text ----- 3.5 Recursion